set YEAR=%DATE:~0,4%
set YEAR=%YEAR: =0%
set MONTH=%DATE:~5,2%
set MONTH=%MONTH: =0%
set DAY=%DATE:~8,2%
set DAY=%DAY: =0%
set HOUR=%TIME:~0,2%
set HOUR=%HOUR: =0%
set MINUTE=%TIME:~3,2%
set MINUTE=%MINUTE: =0%
set SECOND=%TIME:~6,2%
set SECOND=%SECOND: =0%

hdc shell "hitrace -b 204800 -t 5 ability ace app ark binder disk freq idle irq memreclaim mmc multimodalinput ohos pagecache rpc sched sync window workq zaudio zcamera zimage zmedia -o /data/local/tmp/hitrace.ftrace"
if not exist "D:\trace\temp" mkdir "D:\trace\temp"
hdc file recv /data/local/tmp/hitrace.ftrace D:\\trace\\temp\\%1%MONTH%-%DAY%_%HOUR%-%MINUTE%-%SECOND%.ftrace
hdc shell rm -f /data/local/tmp/hitrace.ftrace
